package com.liao.note.vo;


import com.liao.note.enums.ResultCode;

import java.io.Serializable;

public class ResultVO<T> implements Serializable {

    public int code;
    public String msg;
    public T data;

    public ResultVO(T data) {
        this(ResultCode.SUCCESS, data);
    }

    public ResultVO(ResultCode resultCode) {
        this(resultCode, null);
    }

    public ResultVO(ResultCode resultCode, T data) {
        this.code = resultCode.getCode();
        this.msg = resultCode.getMsg();
        this.data = data;
    }
}
